<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="language" content="en" />
        <link href="./assets/ffd55088/css/bootstrap.css" rel="stylesheet">
<link href="./assets/5cf9384a/solarized_light.css" rel="stylesheet">
<link href="./assets/6c54116e/style.css" rel="stylesheet">
<script src="./assets/a44cef0f/jquery.js"></script>
<script src="./assets/ffd55088/js/bootstrap.js"></script>
<script src="./assets/8ac4e28a/jssearch.js"></script>    <title>Migration, yii\db\Migration - Yii Framework 2.0 API Documentation</title>
</head>
<body>

<div class="wrap">
    <nav id="w8667" class="navbar-inverse navbar-fixed-top navbar" role="navigation"><div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w8667-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span></button><a class="navbar-brand" href="./index.html">Yii Framework 2.0 API Documentation</a></div><div id="w8667-collapse" class="collapse navbar-collapse"><ul id="w8668" class="navbar-nav nav"><li><a href="./index.html">Class reference</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Extensions <b class="caret"></b></a><ul id="w8669" class="dropdown-menu"><li><a href="./ext-apidoc-index.html" tabindex="-1">apidoc</a></li>
<li><a href="./ext-authclient-index.html" tabindex="-1">authclient</a></li>
<li><a href="./ext-bootstrap-index.html" tabindex="-1">bootstrap</a></li>
<li><a href="./ext-codeception-index.html" tabindex="-1">codeception</a></li>
<li><a href="./ext-debug-index.html" tabindex="-1">debug</a></li>
<li><a href="./ext-elasticsearch-index.html" tabindex="-1">elasticsearch</a></li>
<li><a href="./ext-faker-index.html" tabindex="-1">faker</a></li>
<li><a href="./ext-gii-index.html" tabindex="-1">gii</a></li>
<li><a href="./ext-imagine-index.html" tabindex="-1">imagine</a></li>
<li><a href="./ext-jui-index.html" tabindex="-1">jui</a></li>
<li><a href="./ext-mongodb-index.html" tabindex="-1">mongodb</a></li>
<li><a href="./ext-redis-index.html" tabindex="-1">redis</a></li>
<li><a href="./ext-smarty-index.html" tabindex="-1">smarty</a></li>
<li><a href="./ext-sphinx-index.html" tabindex="-1">sphinx</a></li>
<li><a href="./ext-swiftmailer-index.html" tabindex="-1">swiftmailer</a></li>
<li><a href="./ext-twig-index.html" tabindex="-1">twig</a></li></ul></li>
<li><a href="./guide-README.html">Guide</a></li></ul><div class="navbar-form navbar-left" role="search">
  <div class="form-group">
    <input id="searchbox" type="text" class="form-control" placeholder="Search">
  </div>
</div>
</div></nav>
    <div id="search-resultbox" style="display: none;" class="modal-content">
        <ul id="search-results">
        </ul>
    </div>

    
<div class="row">
    <div class="col-md-3">
                <div id="navigation" class="list-group"><a class="list-group-item" href="#navigation-8636" data-toggle="collapse" data-parent="#navigation">Not namespaced classes <b class="caret"></b></a><div id="navigation-8636" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii.html">Yii</a></div>
<a class="list-group-item" href="#navigation-8637" data-toggle="collapse" data-parent="#navigation">yii <b class="caret"></b></a><div id="navigation-8637" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-baseyii.html">BaseYii</a></div>
<a class="list-group-item" href="#navigation-8638" data-toggle="collapse" data-parent="#navigation">yii\base <b class="caret"></b></a><div id="navigation-8638" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-base-action.html">Action</a>
<a class="list-group-item" href="./yii-base-actionevent.html">ActionEvent</a>
<a class="list-group-item" href="./yii-base-actionfilter.html">ActionFilter</a>
<a class="list-group-item" href="./yii-base-application.html">Application</a>
<a class="list-group-item" href="./yii-base-arrayaccesstrait.html">ArrayAccessTrait</a>
<a class="list-group-item" href="./yii-base-arrayable.html">Arrayable</a>
<a class="list-group-item" href="./yii-base-arrayabletrait.html">ArrayableTrait</a>
<a class="list-group-item" href="./yii-base-behavior.html">Behavior</a>
<a class="list-group-item" href="./yii-base-bootstrapinterface.html">BootstrapInterface</a>
<a class="list-group-item" href="./yii-base-component.html">Component</a>
<a class="list-group-item" href="./yii-base-configurable.html">Configurable</a>
<a class="list-group-item" href="./yii-base-controller.html">Controller</a>
<a class="list-group-item" href="./yii-base-dynamicmodel.html">DynamicModel</a>
<a class="list-group-item" href="./yii-base-errorexception.html">ErrorException</a>
<a class="list-group-item" href="./yii-base-errorhandler.html">ErrorHandler</a>
<a class="list-group-item" href="./yii-base-event.html">Event</a>
<a class="list-group-item" href="./yii-base-exception.html">Exception</a>
<a class="list-group-item" href="./yii-base-exitexception.html">ExitException</a>
<a class="list-group-item" href="./yii-base-inlineaction.html">InlineAction</a>
<a class="list-group-item" href="./yii-base-invalidcallexception.html">InvalidCallException</a>
<a class="list-group-item" href="./yii-base-invalidconfigexception.html">InvalidConfigException</a>
<a class="list-group-item" href="./yii-base-invalidparamexception.html">InvalidParamException</a>
<a class="list-group-item" href="./yii-base-invalidrouteexception.html">InvalidRouteException</a>
<a class="list-group-item" href="./yii-base-invalidvalueexception.html">InvalidValueException</a>
<a class="list-group-item" href="./yii-base-model.html">Model</a>
<a class="list-group-item" href="./yii-base-modelevent.html">ModelEvent</a>
<a class="list-group-item" href="./yii-base-module.html">Module</a>
<a class="list-group-item" href="./yii-base-notsupportedexception.html">NotSupportedException</a>
<a class="list-group-item" href="./yii-base-object.html">Object</a>
<a class="list-group-item" href="./yii-base-request.html">Request</a>
<a class="list-group-item" href="./yii-base-response.html">Response</a>
<a class="list-group-item" href="./yii-base-security.html">Security</a>
<a class="list-group-item" href="./yii-base-theme.html">Theme</a>
<a class="list-group-item" href="./yii-base-unknownclassexception.html">UnknownClassException</a>
<a class="list-group-item" href="./yii-base-unknownmethodexception.html">UnknownMethodException</a>
<a class="list-group-item" href="./yii-base-unknownpropertyexception.html">UnknownPropertyException</a>
<a class="list-group-item" href="./yii-base-userexception.html">UserException</a>
<a class="list-group-item" href="./yii-base-view.html">View</a>
<a class="list-group-item" href="./yii-base-viewcontextinterface.html">ViewContextInterface</a>
<a class="list-group-item" href="./yii-base-viewevent.html">ViewEvent</a>
<a class="list-group-item" href="./yii-base-viewrenderer.html">ViewRenderer</a>
<a class="list-group-item" href="./yii-base-widget.html">Widget</a></div>
<a class="list-group-item" href="#navigation-8639" data-toggle="collapse" data-parent="#navigation">yii\behaviors <b class="caret"></b></a><div id="navigation-8639" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-behaviors-attributebehavior.html">AttributeBehavior</a>
<a class="list-group-item" href="./yii-behaviors-blameablebehavior.html">BlameableBehavior</a>
<a class="list-group-item" href="./yii-behaviors-sluggablebehavior.html">SluggableBehavior</a>
<a class="list-group-item" href="./yii-behaviors-timestampbehavior.html">TimestampBehavior</a></div>
<a class="list-group-item" href="#navigation-8640" data-toggle="collapse" data-parent="#navigation">yii\caching <b class="caret"></b></a><div id="navigation-8640" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-caching-apccache.html">ApcCache</a>
<a class="list-group-item" href="./yii-caching-arraycache.html">ArrayCache</a>
<a class="list-group-item" href="./yii-caching-cache.html">Cache</a>
<a class="list-group-item" href="./yii-caching-chaineddependency.html">ChainedDependency</a>
<a class="list-group-item" href="./yii-caching-dbcache.html">DbCache</a>
<a class="list-group-item" href="./yii-caching-dbdependency.html">DbDependency</a>
<a class="list-group-item" href="./yii-caching-dependency.html">Dependency</a>
<a class="list-group-item" href="./yii-caching-dummycache.html">DummyCache</a>
<a class="list-group-item" href="./yii-caching-expressiondependency.html">ExpressionDependency</a>
<a class="list-group-item" href="./yii-caching-filecache.html">FileCache</a>
<a class="list-group-item" href="./yii-caching-filedependency.html">FileDependency</a>
<a class="list-group-item" href="./yii-caching-memcache.html">MemCache</a>
<a class="list-group-item" href="./yii-caching-memcacheserver.html">MemCacheServer</a>
<a class="list-group-item" href="./yii-caching-tagdependency.html">TagDependency</a>
<a class="list-group-item" href="./yii-caching-wincache.html">WinCache</a>
<a class="list-group-item" href="./yii-caching-xcache.html">XCache</a>
<a class="list-group-item" href="./yii-caching-zenddatacache.html">ZendDataCache</a></div>
<a class="list-group-item" href="#navigation-8641" data-toggle="collapse" data-parent="#navigation">yii\captcha <b class="caret"></b></a><div id="navigation-8641" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-captcha-captcha.html">Captcha</a>
<a class="list-group-item" href="./yii-captcha-captchaaction.html">CaptchaAction</a>
<a class="list-group-item" href="./yii-captcha-captchaasset.html">CaptchaAsset</a>
<a class="list-group-item" href="./yii-captcha-captchavalidator.html">CaptchaValidator</a></div>
<a class="list-group-item" href="#navigation-8642" data-toggle="collapse" data-parent="#navigation">yii\console <b class="caret"></b></a><div id="navigation-8642" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-console-application.html">Application</a>
<a class="list-group-item" href="./yii-console-controller.html">Controller</a>
<a class="list-group-item" href="./yii-console-errorhandler.html">ErrorHandler</a>
<a class="list-group-item" href="./yii-console-exception.html">Exception</a>
<a class="list-group-item" href="./yii-console-markdown.html">Markdown</a>
<a class="list-group-item" href="./yii-console-request.html">Request</a>
<a class="list-group-item" href="./yii-console-response.html">Response</a></div>
<a class="list-group-item" href="#navigation-8643" data-toggle="collapse" data-parent="#navigation">yii\console\controllers <b class="caret"></b></a><div id="navigation-8643" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-console-controllers-assetcontroller.html">AssetController</a>
<a class="list-group-item" href="./yii-console-controllers-basemigratecontroller.html">BaseMigrateController</a>
<a class="list-group-item" href="./yii-console-controllers-cachecontroller.html">CacheController</a>
<a class="list-group-item" href="./yii-console-controllers-fixturecontroller.html">FixtureController</a>
<a class="list-group-item" href="./yii-console-controllers-helpcontroller.html">HelpController</a>
<a class="list-group-item" href="./yii-console-controllers-messagecontroller.html">MessageController</a>
<a class="list-group-item" href="./yii-console-controllers-migratecontroller.html">MigrateController</a>
<a class="list-group-item" href="./yii-console-controllers-servecontroller.html">ServeController</a></div>
<a class="list-group-item" href="#navigation-8644" data-toggle="collapse" data-parent="#navigation">yii\data <b class="caret"></b></a><div id="navigation-8644" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-data-activedataprovider.html">ActiveDataProvider</a>
<a class="list-group-item" href="./yii-data-arraydataprovider.html">ArrayDataProvider</a>
<a class="list-group-item" href="./yii-data-basedataprovider.html">BaseDataProvider</a>
<a class="list-group-item" href="./yii-data-dataproviderinterface.html">DataProviderInterface</a>
<a class="list-group-item" href="./yii-data-pagination.html">Pagination</a>
<a class="list-group-item" href="./yii-data-sort.html">Sort</a>
<a class="list-group-item" href="./yii-data-sqldataprovider.html">SqlDataProvider</a></div>
<a class="list-group-item active" href="#navigation-8645" data-toggle="collapse" data-parent="#navigation">yii\db <b class="caret"></b></a><div id="navigation-8645" class="submenu panel-collapse collapse in"><a class="list-group-item" href="./yii-db-activequery.html">ActiveQuery</a>
<a class="list-group-item" href="./yii-db-activequeryinterface.html">ActiveQueryInterface</a>
<a class="list-group-item" href="./yii-db-activequerytrait.html">ActiveQueryTrait</a>
<a class="list-group-item" href="./yii-db-activerecord.html">ActiveRecord</a>
<a class="list-group-item" href="./yii-db-activerecordinterface.html">ActiveRecordInterface</a>
<a class="list-group-item" href="./yii-db-activerelationtrait.html">ActiveRelationTrait</a>
<a class="list-group-item" href="./yii-db-aftersaveevent.html">AfterSaveEvent</a>
<a class="list-group-item" href="./yii-db-baseactiverecord.html">BaseActiveRecord</a>
<a class="list-group-item" href="./yii-db-batchqueryresult.html">BatchQueryResult</a>
<a class="list-group-item" href="./yii-db-columnschema.html">ColumnSchema</a>
<a class="list-group-item" href="./yii-db-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-command.html">Command</a>
<a class="list-group-item" href="./yii-db-connection.html">Connection</a>
<a class="list-group-item" href="./yii-db-datareader.html">DataReader</a>
<a class="list-group-item" href="./yii-db-exception.html">Exception</a>
<a class="list-group-item" href="./yii-db-expression.html">Expression</a>
<a class="list-group-item" href="./yii-db-integrityexception.html">IntegrityException</a>
<a class="list-group-item active" href="./yii-db-migration.html">Migration</a>
<a class="list-group-item" href="./yii-db-migrationinterface.html">MigrationInterface</a>
<a class="list-group-item" href="./yii-db-query.html">Query</a>
<a class="list-group-item" href="./yii-db-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-queryinterface.html">QueryInterface</a>
<a class="list-group-item" href="./yii-db-querytrait.html">QueryTrait</a>
<a class="list-group-item" href="./yii-db-schema.html">Schema</a>
<a class="list-group-item" href="./yii-db-schemabuildertrait.html">SchemaBuilderTrait</a>
<a class="list-group-item" href="./yii-db-staleobjectexception.html">StaleObjectException</a>
<a class="list-group-item" href="./yii-db-tableschema.html">TableSchema</a>
<a class="list-group-item" href="./yii-db-transaction.html">Transaction</a></div>
<a class="list-group-item" href="#navigation-8646" data-toggle="collapse" data-parent="#navigation">yii\db\cubrid <b class="caret"></b></a><div id="navigation-8646" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-cubrid-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-cubrid-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-cubrid-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-8647" data-toggle="collapse" data-parent="#navigation">yii\db\mssql <b class="caret"></b></a><div id="navigation-8647" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-mssql-pdo.html">PDO</a>
<a class="list-group-item" href="./yii-db-mssql-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-mssql-schema.html">Schema</a>
<a class="list-group-item" href="./yii-db-mssql-sqlsrvpdo.html">SqlsrvPDO</a>
<a class="list-group-item" href="./yii-db-mssql-tableschema.html">TableSchema</a></div>
<a class="list-group-item" href="#navigation-8648" data-toggle="collapse" data-parent="#navigation">yii\db\mysql <b class="caret"></b></a><div id="navigation-8648" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-mysql-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-mysql-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-mysql-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-8649" data-toggle="collapse" data-parent="#navigation">yii\db\oci <b class="caret"></b></a><div id="navigation-8649" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-oci-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-oci-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-oci-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-8650" data-toggle="collapse" data-parent="#navigation">yii\db\pgsql <b class="caret"></b></a><div id="navigation-8650" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-pgsql-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-pgsql-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-8651" data-toggle="collapse" data-parent="#navigation">yii\db\sqlite <b class="caret"></b></a><div id="navigation-8651" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-sqlite-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-sqlite-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-sqlite-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-8652" data-toggle="collapse" data-parent="#navigation">yii\di <b class="caret"></b></a><div id="navigation-8652" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-di-container.html">Container</a>
<a class="list-group-item" href="./yii-di-instance.html">Instance</a>
<a class="list-group-item" href="./yii-di-notinstantiableexception.html">NotInstantiableException</a>
<a class="list-group-item" href="./yii-di-servicelocator.html">ServiceLocator</a></div>
<a class="list-group-item" href="#navigation-8653" data-toggle="collapse" data-parent="#navigation">yii\filters <b class="caret"></b></a><div id="navigation-8653" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-filters-accesscontrol.html">AccessControl</a>
<a class="list-group-item" href="./yii-filters-accessrule.html">AccessRule</a>
<a class="list-group-item" href="./yii-filters-contentnegotiator.html">ContentNegotiator</a>
<a class="list-group-item" href="./yii-filters-cors.html">Cors</a>
<a class="list-group-item" href="./yii-filters-httpcache.html">HttpCache</a>
<a class="list-group-item" href="./yii-filters-pagecache.html">PageCache</a>
<a class="list-group-item" href="./yii-filters-ratelimitinterface.html">RateLimitInterface</a>
<a class="list-group-item" href="./yii-filters-ratelimiter.html">RateLimiter</a>
<a class="list-group-item" href="./yii-filters-verbfilter.html">VerbFilter</a></div>
<a class="list-group-item" href="#navigation-8654" data-toggle="collapse" data-parent="#navigation">yii\filters\auth <b class="caret"></b></a><div id="navigation-8654" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-filters-auth-authinterface.html">AuthInterface</a>
<a class="list-group-item" href="./yii-filters-auth-authmethod.html">AuthMethod</a>
<a class="list-group-item" href="./yii-filters-auth-compositeauth.html">CompositeAuth</a>
<a class="list-group-item" href="./yii-filters-auth-httpbasicauth.html">HttpBasicAuth</a>
<a class="list-group-item" href="./yii-filters-auth-httpbearerauth.html">HttpBearerAuth</a>
<a class="list-group-item" href="./yii-filters-auth-queryparamauth.html">QueryParamAuth</a></div>
<a class="list-group-item" href="#navigation-8655" data-toggle="collapse" data-parent="#navigation">yii\grid <b class="caret"></b></a><div id="navigation-8655" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-grid-actioncolumn.html">ActionColumn</a>
<a class="list-group-item" href="./yii-grid-checkboxcolumn.html">CheckboxColumn</a>
<a class="list-group-item" href="./yii-grid-column.html">Column</a>
<a class="list-group-item" href="./yii-grid-datacolumn.html">DataColumn</a>
<a class="list-group-item" href="./yii-grid-gridview.html">GridView</a>
<a class="list-group-item" href="./yii-grid-gridviewasset.html">GridViewAsset</a>
<a class="list-group-item" href="./yii-grid-serialcolumn.html">SerialColumn</a></div>
<a class="list-group-item" href="#navigation-8656" data-toggle="collapse" data-parent="#navigation">yii\helpers <b class="caret"></b></a><div id="navigation-8656" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-helpers-arrayhelper.html">ArrayHelper</a>
<a class="list-group-item" href="./yii-helpers-basearrayhelper.html">BaseArrayHelper</a>
<a class="list-group-item" href="./yii-helpers-baseconsole.html">BaseConsole</a>
<a class="list-group-item" href="./yii-helpers-basefilehelper.html">BaseFileHelper</a>
<a class="list-group-item" href="./yii-helpers-baseformatconverter.html">BaseFormatConverter</a>
<a class="list-group-item" href="./yii-helpers-basehtml.html">BaseHtml</a>
<a class="list-group-item" href="./yii-helpers-basehtmlpurifier.html">BaseHtmlPurifier</a>
<a class="list-group-item" href="./yii-helpers-baseinflector.html">BaseInflector</a>
<a class="list-group-item" href="./yii-helpers-basejson.html">BaseJson</a>
<a class="list-group-item" href="./yii-helpers-basemarkdown.html">BaseMarkdown</a>
<a class="list-group-item" href="./yii-helpers-basestringhelper.html">BaseStringHelper</a>
<a class="list-group-item" href="./yii-helpers-baseurl.html">BaseUrl</a>
<a class="list-group-item" href="./yii-helpers-basevardumper.html">BaseVarDumper</a>
<a class="list-group-item" href="./yii-helpers-console.html">Console</a>
<a class="list-group-item" href="./yii-helpers-filehelper.html">FileHelper</a>
<a class="list-group-item" href="./yii-helpers-formatconverter.html">FormatConverter</a>
<a class="list-group-item" href="./yii-helpers-html.html">Html</a>
<a class="list-group-item" href="./yii-helpers-htmlpurifier.html">HtmlPurifier</a>
<a class="list-group-item" href="./yii-helpers-inflector.html">Inflector</a>
<a class="list-group-item" href="./yii-helpers-json.html">Json</a>
<a class="list-group-item" href="./yii-helpers-markdown.html">Markdown</a>
<a class="list-group-item" href="./yii-helpers-stringhelper.html">StringHelper</a>
<a class="list-group-item" href="./yii-helpers-url.html">Url</a>
<a class="list-group-item" href="./yii-helpers-vardumper.html">VarDumper</a></div>
<a class="list-group-item" href="#navigation-8657" data-toggle="collapse" data-parent="#navigation">yii\i18n <b class="caret"></b></a><div id="navigation-8657" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-i18n-dbmessagesource.html">DbMessageSource</a>
<a class="list-group-item" href="./yii-i18n-formatter.html">Formatter</a>
<a class="list-group-item" href="./yii-i18n-gettextfile.html">GettextFile</a>
<a class="list-group-item" href="./yii-i18n-gettextmessagesource.html">GettextMessageSource</a>
<a class="list-group-item" href="./yii-i18n-gettextmofile.html">GettextMoFile</a>
<a class="list-group-item" href="./yii-i18n-gettextpofile.html">GettextPoFile</a>
<a class="list-group-item" href="./yii-i18n-i18n.html">I18N</a>
<a class="list-group-item" href="./yii-i18n-messageformatter.html">MessageFormatter</a>
<a class="list-group-item" href="./yii-i18n-messagesource.html">MessageSource</a>
<a class="list-group-item" href="./yii-i18n-missingtranslationevent.html">MissingTranslationEvent</a>
<a class="list-group-item" href="./yii-i18n-phpmessagesource.html">PhpMessageSource</a></div>
<a class="list-group-item" href="#navigation-8658" data-toggle="collapse" data-parent="#navigation">yii\log <b class="caret"></b></a><div id="navigation-8658" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-log-dbtarget.html">DbTarget</a>
<a class="list-group-item" href="./yii-log-dispatcher.html">Dispatcher</a>
<a class="list-group-item" href="./yii-log-emailtarget.html">EmailTarget</a>
<a class="list-group-item" href="./yii-log-filetarget.html">FileTarget</a>
<a class="list-group-item" href="./yii-log-logger.html">Logger</a>
<a class="list-group-item" href="./yii-log-syslogtarget.html">SyslogTarget</a>
<a class="list-group-item" href="./yii-log-target.html">Target</a></div>
<a class="list-group-item" href="#navigation-8659" data-toggle="collapse" data-parent="#navigation">yii\mail <b class="caret"></b></a><div id="navigation-8659" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-mail-basemailer.html">BaseMailer</a>
<a class="list-group-item" href="./yii-mail-basemessage.html">BaseMessage</a>
<a class="list-group-item" href="./yii-mail-mailevent.html">MailEvent</a>
<a class="list-group-item" href="./yii-mail-mailerinterface.html">MailerInterface</a>
<a class="list-group-item" href="./yii-mail-messageinterface.html">MessageInterface</a></div>
<a class="list-group-item" href="#navigation-8660" data-toggle="collapse" data-parent="#navigation">yii\mutex <b class="caret"></b></a><div id="navigation-8660" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-mutex-dbmutex.html">DbMutex</a>
<a class="list-group-item" href="./yii-mutex-filemutex.html">FileMutex</a>
<a class="list-group-item" href="./yii-mutex-mutex.html">Mutex</a>
<a class="list-group-item" href="./yii-mutex-mysqlmutex.html">MysqlMutex</a>
<a class="list-group-item" href="./yii-mutex-pgsqlmutex.html">PgsqlMutex</a></div>
<a class="list-group-item" href="#navigation-8661" data-toggle="collapse" data-parent="#navigation">yii\rbac <b class="caret"></b></a><div id="navigation-8661" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-rbac-assignment.html">Assignment</a>
<a class="list-group-item" href="./yii-rbac-basemanager.html">BaseManager</a>
<a class="list-group-item" href="./yii-rbac-checkaccessinterface.html">CheckAccessInterface</a>
<a class="list-group-item" href="./yii-rbac-dbmanager.html">DbManager</a>
<a class="list-group-item" href="./yii-rbac-item.html">Item</a>
<a class="list-group-item" href="./yii-rbac-managerinterface.html">ManagerInterface</a>
<a class="list-group-item" href="./yii-rbac-permission.html">Permission</a>
<a class="list-group-item" href="./yii-rbac-phpmanager.html">PhpManager</a>
<a class="list-group-item" href="./yii-rbac-role.html">Role</a>
<a class="list-group-item" href="./yii-rbac-rule.html">Rule</a></div>
<a class="list-group-item" href="#navigation-8662" data-toggle="collapse" data-parent="#navigation">yii\rest <b class="caret"></b></a><div id="navigation-8662" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-rest-action.html">Action</a>
<a class="list-group-item" href="./yii-rest-activecontroller.html">ActiveController</a>
<a class="list-group-item" href="./yii-rest-controller.html">Controller</a>
<a class="list-group-item" href="./yii-rest-createaction.html">CreateAction</a>
<a class="list-group-item" href="./yii-rest-deleteaction.html">DeleteAction</a>
<a class="list-group-item" href="./yii-rest-indexaction.html">IndexAction</a>
<a class="list-group-item" href="./yii-rest-optionsaction.html">OptionsAction</a>
<a class="list-group-item" href="./yii-rest-serializer.html">Serializer</a>
<a class="list-group-item" href="./yii-rest-updateaction.html">UpdateAction</a>
<a class="list-group-item" href="./yii-rest-urlrule.html">UrlRule</a>
<a class="list-group-item" href="./yii-rest-viewaction.html">ViewAction</a></div>
<a class="list-group-item" href="#navigation-8663" data-toggle="collapse" data-parent="#navigation">yii\test <b class="caret"></b></a><div id="navigation-8663" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-test-activefixture.html">ActiveFixture</a>
<a class="list-group-item" href="./yii-test-arrayfixture.html">ArrayFixture</a>
<a class="list-group-item" href="./yii-test-baseactivefixture.html">BaseActiveFixture</a>
<a class="list-group-item" href="./yii-test-dbfixture.html">DbFixture</a>
<a class="list-group-item" href="./yii-test-fixture.html">Fixture</a>
<a class="list-group-item" href="./yii-test-fixturetrait.html">FixtureTrait</a>
<a class="list-group-item" href="./yii-test-initdbfixture.html">InitDbFixture</a></div>
<a class="list-group-item" href="#navigation-8664" data-toggle="collapse" data-parent="#navigation">yii\validators <b class="caret"></b></a><div id="navigation-8664" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-validators-booleanvalidator.html">BooleanValidator</a>
<a class="list-group-item" href="./yii-validators-comparevalidator.html">CompareValidator</a>
<a class="list-group-item" href="./yii-validators-datevalidator.html">DateValidator</a>
<a class="list-group-item" href="./yii-validators-defaultvaluevalidator.html">DefaultValueValidator</a>
<a class="list-group-item" href="./yii-validators-eachvalidator.html">EachValidator</a>
<a class="list-group-item" href="./yii-validators-emailvalidator.html">EmailValidator</a>
<a class="list-group-item" href="./yii-validators-existvalidator.html">ExistValidator</a>
<a class="list-group-item" href="./yii-validators-filevalidator.html">FileValidator</a>
<a class="list-group-item" href="./yii-validators-filtervalidator.html">FilterValidator</a>
<a class="list-group-item" href="./yii-validators-imagevalidator.html">ImageValidator</a>
<a class="list-group-item" href="./yii-validators-inlinevalidator.html">InlineValidator</a>
<a class="list-group-item" href="./yii-validators-ipvalidator.html">IpValidator</a>
<a class="list-group-item" href="./yii-validators-numbervalidator.html">NumberValidator</a>
<a class="list-group-item" href="./yii-validators-punycodeasset.html">PunycodeAsset</a>
<a class="list-group-item" href="./yii-validators-rangevalidator.html">RangeValidator</a>
<a class="list-group-item" href="./yii-validators-regularexpressionvalidator.html">RegularExpressionValidator</a>
<a class="list-group-item" href="./yii-validators-requiredvalidator.html">RequiredValidator</a>
<a class="list-group-item" href="./yii-validators-safevalidator.html">SafeValidator</a>
<a class="list-group-item" href="./yii-validators-stringvalidator.html">StringValidator</a>
<a class="list-group-item" href="./yii-validators-uniquevalidator.html">UniqueValidator</a>
<a class="list-group-item" href="./yii-validators-urlvalidator.html">UrlValidator</a>
<a class="list-group-item" href="./yii-validators-validationasset.html">ValidationAsset</a>
<a class="list-group-item" href="./yii-validators-validator.html">Validator</a></div>
<a class="list-group-item" href="#navigation-8665" data-toggle="collapse" data-parent="#navigation">yii\web <b class="caret"></b></a><div id="navigation-8665" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-web-application.html">Application</a>
<a class="list-group-item" href="./yii-web-assetbundle.html">AssetBundle</a>
<a class="list-group-item" href="./yii-web-assetconverter.html">AssetConverter</a>
<a class="list-group-item" href="./yii-web-assetconverterinterface.html">AssetConverterInterface</a>
<a class="list-group-item" href="./yii-web-assetmanager.html">AssetManager</a>
<a class="list-group-item" href="./yii-web-badrequesthttpexception.html">BadRequestHttpException</a>
<a class="list-group-item" href="./yii-web-cachesession.html">CacheSession</a>
<a class="list-group-item" href="./yii-web-compositeurlrule.html">CompositeUrlRule</a>
<a class="list-group-item" href="./yii-web-conflicthttpexception.html">ConflictHttpException</a>
<a class="list-group-item" href="./yii-web-controller.html">Controller</a>
<a class="list-group-item" href="./yii-web-cookie.html">Cookie</a>
<a class="list-group-item" href="./yii-web-cookiecollection.html">CookieCollection</a>
<a class="list-group-item" href="./yii-web-dbsession.html">DbSession</a>
<a class="list-group-item" href="./yii-web-erroraction.html">ErrorAction</a>
<a class="list-group-item" href="./yii-web-errorhandler.html">ErrorHandler</a>
<a class="list-group-item" href="./yii-web-forbiddenhttpexception.html">ForbiddenHttpException</a>
<a class="list-group-item" href="./yii-web-gonehttpexception.html">GoneHttpException</a>
<a class="list-group-item" href="./yii-web-groupurlrule.html">GroupUrlRule</a>
<a class="list-group-item" href="./yii-web-headercollection.html">HeaderCollection</a>
<a class="list-group-item" href="./yii-web-htmlresponseformatter.html">HtmlResponseFormatter</a>
<a class="list-group-item" href="./yii-web-httpexception.html">HttpException</a>
<a class="list-group-item" href="./yii-web-identityinterface.html">IdentityInterface</a>
<a class="list-group-item" href="./yii-web-jqueryasset.html">JqueryAsset</a>
<a class="list-group-item" href="./yii-web-jsexpression.html">JsExpression</a>
<a class="list-group-item" href="./yii-web-jsonparser.html">JsonParser</a>
<a class="list-group-item" href="./yii-web-jsonresponseformatter.html">JsonResponseFormatter</a>
<a class="list-group-item" href="./yii-web-link.html">Link</a>
<a class="list-group-item" href="./yii-web-linkable.html">Linkable</a>
<a class="list-group-item" href="./yii-web-methodnotallowedhttpexception.html">MethodNotAllowedHttpException</a>
<a class="list-group-item" href="./yii-web-multifieldsession.html">MultiFieldSession</a>
<a class="list-group-item" href="./yii-web-notacceptablehttpexception.html">NotAcceptableHttpException</a>
<a class="list-group-item" href="./yii-web-notfoundhttpexception.html">NotFoundHttpException</a>
<a class="list-group-item" href="./yii-web-request.html">Request</a>
<a class="list-group-item" href="./yii-web-requestparserinterface.html">RequestParserInterface</a>
<a class="list-group-item" href="./yii-web-response.html">Response</a>
<a class="list-group-item" href="./yii-web-responseformatterinterface.html">ResponseFormatterInterface</a>
<a class="list-group-item" href="./yii-web-servererrorhttpexception.html">ServerErrorHttpException</a>
<a class="list-group-item" href="./yii-web-session.html">Session</a>
<a class="list-group-item" href="./yii-web-sessioniterator.html">SessionIterator</a>
<a class="list-group-item" href="./yii-web-toomanyrequestshttpexception.html">TooManyRequestsHttpException</a>
<a class="list-group-item" href="./yii-web-unauthorizedhttpexception.html">UnauthorizedHttpException</a>
<a class="list-group-item" href="./yii-web-unprocessableentityhttpexception.html">UnprocessableEntityHttpException</a>
<a class="list-group-item" href="./yii-web-unsupportedmediatypehttpexception.html">UnsupportedMediaTypeHttpException</a>
<a class="list-group-item" href="./yii-web-uploadedfile.html">UploadedFile</a>
<a class="list-group-item" href="./yii-web-urlmanager.html">UrlManager</a>
<a class="list-group-item" href="./yii-web-urlrule.html">UrlRule</a>
<a class="list-group-item" href="./yii-web-urlruleinterface.html">UrlRuleInterface</a>
<a class="list-group-item" href="./yii-web-user.html">User</a>
<a class="list-group-item" href="./yii-web-userevent.html">UserEvent</a>
<a class="list-group-item" href="./yii-web-view.html">View</a>
<a class="list-group-item" href="./yii-web-viewaction.html">ViewAction</a>
<a class="list-group-item" href="./yii-web-xmlresponseformatter.html">XmlResponseFormatter</a>
<a class="list-group-item" href="./yii-web-yiiasset.html">YiiAsset</a></div>
<a class="list-group-item" href="#navigation-8666" data-toggle="collapse" data-parent="#navigation">yii\widgets <b class="caret"></b></a><div id="navigation-8666" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-widgets-activefield.html">ActiveField</a>
<a class="list-group-item" href="./yii-widgets-activeform.html">ActiveForm</a>
<a class="list-group-item" href="./yii-widgets-activeformasset.html">ActiveFormAsset</a>
<a class="list-group-item" href="./yii-widgets-baselistview.html">BaseListView</a>
<a class="list-group-item" href="./yii-widgets-block.html">Block</a>
<a class="list-group-item" href="./yii-widgets-breadcrumbs.html">Breadcrumbs</a>
<a class="list-group-item" href="./yii-widgets-contentdecorator.html">ContentDecorator</a>
<a class="list-group-item" href="./yii-widgets-detailview.html">DetailView</a>
<a class="list-group-item" href="./yii-widgets-fragmentcache.html">FragmentCache</a>
<a class="list-group-item" href="./yii-widgets-inputwidget.html">InputWidget</a>
<a class="list-group-item" href="./yii-widgets-linkpager.html">LinkPager</a>
<a class="list-group-item" href="./yii-widgets-linksorter.html">LinkSorter</a>
<a class="list-group-item" href="./yii-widgets-listview.html">ListView</a>
<a class="list-group-item" href="./yii-widgets-maskedinput.html">MaskedInput</a>
<a class="list-group-item" href="./yii-widgets-maskedinputasset.html">MaskedInputAsset</a>
<a class="list-group-item" href="./yii-widgets-menu.html">Menu</a>
<a class="list-group-item" href="./yii-widgets-pjax.html">Pjax</a>
<a class="list-group-item" href="./yii-widgets-pjaxasset.html">PjaxAsset</a>
<a class="list-group-item" href="./yii-widgets-spaceless.html">Spaceless</a></div></div>    </div>
    <div class="col-md-9 api-content" role="main">
        <h1>Class yii\db\Migration</h1>
<div class="top-nav">
    <a href="index.html">All Classes</a>
            | <a href="#properties">Properties</a>
                | <a href="#methods">Methods</a>
            </div>

<table class="summaryTable docClass table table-bordered">
    <colgroup>
        <col class="col-name" />
        <col class="col-value" />
    </colgroup>
            <tr><th>Inheritance</th><td><a href="yii-db-migration.html">yii\db\Migration</a> &raquo;
<a href="yii-base-component.html">yii\base\Component</a> &raquo;
<a href="yii-base-object.html">yii\base\Object</a></td></tr>
                <tr><th>Implements</th><td><a href="yii-base-configurable.html">yii\base\Configurable</a>, <a href="yii-db-migrationinterface.html">yii\db\MigrationInterface</a></td></tr>
                    <tr><th>Uses Traits</th><td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td></tr>
                            <tr><th>Available since version</th><td>2.0</td></tr>
                    <tr>
          <th>Source Code</th>
          <td><a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php">https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php</a></td>
        </tr>
    </table>

<div class="class-description">
    <p><strong>Migration is the base class for representing a database migration.</strong></p>
    <p>Migration is designed to be used together with the "yii migrate" command.</p>
<p>Each child class of Migration represents an individual database migration which
is identified by the child class name.</p>
<p>Within each migration, the <a href="yii-db-migration.html#up()-detail">up()</a> method should be overridden to contain the logic
for "upgrading" the database; while the <a href="yii-db-migration.html#down()-detail">down()</a> method for the "downgrading"
logic. The "yii migrate" command manages all available migrations in an application.</p>
<p>If the database supports transactions, you may also override <a href="yii-db-migration.html#safeUp()-detail">safeUp()</a> and
<a href="yii-db-migration.html#safeDown()-detail">safeDown()</a> so that if anything wrong happens during the upgrading or downgrading,
the whole migration can be reverted in a whole.</p>
<p>Migration provides a set of convenient methods for manipulating database data and schema.
For example, the <a href="yii-db-migration.html#insert()-detail">insert()</a> method can be used to easily insert a row of data into
a database table; the <a href="yii-db-migration.html#createTable()-detail">createTable()</a> method can be used to create a database table.
Compared with the same methods in <a href="yii-db-command.html">yii\db\Command</a>, these methods will display extra
information showing the method parameters and execution time, which may be useful when
applying migrations.</p>

    </div>

<a id="properties"></a>

<div class="summary doc-property">
<h2>Public Properties</h2>

<p><a href="#" class="toggle">Hide inherited properties</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-property" />
    <col class="col-type" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Property</th><th>Type</th><th>Description</th><th>Defined By</th>
</tr>
        <tr class="inherited" id="$behaviors">
        <td><a href="yii-base-component.html#$behaviors-detail">$behaviors</a></td>
        <td><a href="yii-base-behavior.html">yii\base\Behavior</a>[]</td>
        <td>List of behaviors attached to this component</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="$db">
        <td><a href="yii-db-migration.html#$db-detail">$db</a></td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a>|<a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/language.types.string">string</a></td>
        <td>The DB connection object or the application component ID of the DB connection
that this migration should work with.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
    </table>
</div>

<a id="methods"></a>

<div class="summary doc-method">
<h2>Public Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
        <tr class="inherited" id="__call()">
        <td><a href="yii-base-component.html#__call()-detail">__call()</a></td>
        <td>Calls the named method which is not a class method.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__clone()">
        <td><a href="yii-base-component.html#__clone()-detail">__clone()</a></td>
        <td>This method is called after the object is created by cloning an existing one.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__construct()">
        <td><a href="yii-base-object.html#__construct()-detail">__construct()</a></td>
        <td>Constructor.</td>
        <td><a href="yii-base-object.html">yii\base\Object</a></td>
    </tr>
            <tr class="inherited" id="__get()">
        <td><a href="yii-base-component.html#__get()-detail">__get()</a></td>
        <td>Returns the value of a component property.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__isset()">
        <td><a href="yii-base-component.html#__isset()-detail">__isset()</a></td>
        <td>Checks if a property is set, i.e. defined and not null.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__set()">
        <td><a href="yii-base-component.html#__set()-detail">__set()</a></td>
        <td>Sets the value of a component property.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__unset()">
        <td><a href="yii-base-component.html#__unset()-detail">__unset()</a></td>
        <td>Sets a component property to be null.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="addColumn()">
        <td><a href="yii-db-migration.html#addColumn()-detail">addColumn()</a></td>
        <td>Builds and executes a SQL statement for adding a new DB column.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="addCommentOnColumn()">
        <td><a href="yii-db-migration.html#addCommentOnColumn()-detail">addCommentOnColumn()</a></td>
        <td>Builds and execute a SQL statement for adding comment to column</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="addCommentOnTable()">
        <td><a href="yii-db-migration.html#addCommentOnTable()-detail">addCommentOnTable()</a></td>
        <td>Builds a SQL statement for adding comment to table</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="addForeignKey()">
        <td><a href="yii-db-migration.html#addForeignKey()-detail">addForeignKey()</a></td>
        <td>Builds a SQL statement for adding a foreign key constraint to an existing table.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="addPrimaryKey()">
        <td><a href="yii-db-migration.html#addPrimaryKey()-detail">addPrimaryKey()</a></td>
        <td>Builds and executes a SQL statement for creating a primary key.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="alterColumn()">
        <td><a href="yii-db-migration.html#alterColumn()-detail">alterColumn()</a></td>
        <td>Builds and executes a SQL statement for changing the definition of a column.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="attachBehavior()">
        <td><a href="yii-base-component.html#attachBehavior()-detail">attachBehavior()</a></td>
        <td>Attaches a behavior to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="attachBehaviors()">
        <td><a href="yii-base-component.html#attachBehaviors()-detail">attachBehaviors()</a></td>
        <td>Attaches a list of behaviors to the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="batchInsert()">
        <td><a href="yii-db-migration.html#batchInsert()-detail">batchInsert()</a></td>
        <td>Creates and executes an batch INSERT SQL statement.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="behaviors()">
        <td><a href="yii-base-component.html#behaviors()-detail">behaviors()</a></td>
        <td>Returns a list of behaviors that this component should behave as.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="bigInteger()">
        <td><a href="yii-db-schemabuildertrait.html#bigInteger()-detail">bigInteger()</a></td>
        <td>Creates a bigint column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="bigPrimaryKey()">
        <td><a href="yii-db-schemabuildertrait.html#bigPrimaryKey()-detail">bigPrimaryKey()</a></td>
        <td>Creates a big primary key column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="binary()">
        <td><a href="yii-db-schemabuildertrait.html#binary()-detail">binary()</a></td>
        <td>Creates a binary column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="boolean()">
        <td><a href="yii-db-schemabuildertrait.html#boolean()-detail">boolean()</a></td>
        <td>Creates a boolean column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="canGetProperty()">
        <td><a href="yii-base-component.html#canGetProperty()-detail">canGetProperty()</a></td>
        <td>Returns a value indicating whether a property can be read.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="canSetProperty()">
        <td><a href="yii-base-component.html#canSetProperty()-detail">canSetProperty()</a></td>
        <td>Returns a value indicating whether a property can be set.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="char()">
        <td><a href="yii-db-schemabuildertrait.html#char()-detail">char()</a></td>
        <td>Creates a char column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="className()">
        <td><a href="yii-base-object.html#className()-detail">className()</a></td>
        <td>Returns the fully qualified name of this class.</td>
        <td><a href="yii-base-object.html">yii\base\Object</a></td>
    </tr>
            <tr id="createIndex()">
        <td><a href="yii-db-migration.html#createIndex()-detail">createIndex()</a></td>
        <td>Builds and executes a SQL statement for creating a new index.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="createTable()">
        <td><a href="yii-db-migration.html#createTable()-detail">createTable()</a></td>
        <td>Builds and executes a SQL statement for creating a new DB table.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="date()">
        <td><a href="yii-db-schemabuildertrait.html#date()-detail">date()</a></td>
        <td>Creates a date column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="dateTime()">
        <td><a href="yii-db-schemabuildertrait.html#dateTime()-detail">dateTime()</a></td>
        <td>Creates a datetime column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="decimal()">
        <td><a href="yii-db-schemabuildertrait.html#decimal()-detail">decimal()</a></td>
        <td>Creates a decimal column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr id="delete()">
        <td><a href="yii-db-migration.html#delete()-detail">delete()</a></td>
        <td>Creates and executes a DELETE SQL statement.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="detachBehavior()">
        <td><a href="yii-base-component.html#detachBehavior()-detail">detachBehavior()</a></td>
        <td>Detaches a behavior from the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="detachBehaviors()">
        <td><a href="yii-base-component.html#detachBehaviors()-detail">detachBehaviors()</a></td>
        <td>Detaches all behaviors from the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="double()">
        <td><a href="yii-db-schemabuildertrait.html#double()-detail">double()</a></td>
        <td>Creates a double column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr id="down()">
        <td><a href="yii-db-migration.html#down()-detail">down()</a></td>
        <td>This method contains the logic to be executed when removing this migration.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="dropColumn()">
        <td><a href="yii-db-migration.html#dropColumn()-detail">dropColumn()</a></td>
        <td>Builds and executes a SQL statement for dropping a DB column.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="dropCommentFromColumn()">
        <td><a href="yii-db-migration.html#dropCommentFromColumn()-detail">dropCommentFromColumn()</a></td>
        <td>Builds and execute a SQL statement for dropping comment from column</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="dropCommentFromTable()">
        <td><a href="yii-db-migration.html#dropCommentFromTable()-detail">dropCommentFromTable()</a></td>
        <td>Builds a SQL statement for dropping comment from table</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="dropForeignKey()">
        <td><a href="yii-db-migration.html#dropForeignKey()-detail">dropForeignKey()</a></td>
        <td>Builds a SQL statement for dropping a foreign key constraint.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="dropIndex()">
        <td><a href="yii-db-migration.html#dropIndex()-detail">dropIndex()</a></td>
        <td>Builds and executes a SQL statement for dropping an index.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="dropPrimaryKey()">
        <td><a href="yii-db-migration.html#dropPrimaryKey()-detail">dropPrimaryKey()</a></td>
        <td>Builds and executes a SQL statement for dropping a primary key.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="dropTable()">
        <td><a href="yii-db-migration.html#dropTable()-detail">dropTable()</a></td>
        <td>Builds and executes a SQL statement for dropping a DB table.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="ensureBehaviors()">
        <td><a href="yii-base-component.html#ensureBehaviors()-detail">ensureBehaviors()</a></td>
        <td>Makes sure that the behaviors declared in <a href="yii-base-component.html#behaviors()-detail">behaviors()</a> are attached to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="execute()">
        <td><a href="yii-db-migration.html#execute()-detail">execute()</a></td>
        <td>Executes a SQL statement.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="float()">
        <td><a href="yii-db-schemabuildertrait.html#float()-detail">float()</a></td>
        <td>Creates a float column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="getBehavior()">
        <td><a href="yii-base-component.html#getBehavior()-detail">getBehavior()</a></td>
        <td>Returns the named behavior object.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="getBehaviors()">
        <td><a href="yii-base-component.html#getBehaviors()-detail">getBehaviors()</a></td>
        <td>Returns all behaviors attached to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
                <tr class="inherited" id="hasEventHandlers()">
        <td><a href="yii-base-component.html#hasEventHandlers()-detail">hasEventHandlers()</a></td>
        <td>Returns a value indicating whether there is any handler attached to the named event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="hasMethod()">
        <td><a href="yii-base-component.html#hasMethod()-detail">hasMethod()</a></td>
        <td>Returns a value indicating whether a method is defined.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="hasProperty()">
        <td><a href="yii-base-component.html#hasProperty()-detail">hasProperty()</a></td>
        <td>Returns a value indicating whether a property is defined for this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="init()">
        <td><a href="yii-db-migration.html#init()-detail">init()</a></td>
        <td>Initializes the migration.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="insert()">
        <td><a href="yii-db-migration.html#insert()-detail">insert()</a></td>
        <td>Creates and executes an INSERT SQL statement.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="integer()">
        <td><a href="yii-db-schemabuildertrait.html#integer()-detail">integer()</a></td>
        <td>Creates an integer column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="money()">
        <td><a href="yii-db-schemabuildertrait.html#money()-detail">money()</a></td>
        <td>Creates a money column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="off()">
        <td><a href="yii-base-component.html#off()-detail">off()</a></td>
        <td>Detaches an existing event handler from this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="on()">
        <td><a href="yii-base-component.html#on()-detail">on()</a></td>
        <td>Attaches an event handler to an event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="primaryKey()">
        <td><a href="yii-db-schemabuildertrait.html#primaryKey()-detail">primaryKey()</a></td>
        <td>Creates a primary key column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr id="renameColumn()">
        <td><a href="yii-db-migration.html#renameColumn()-detail">renameColumn()</a></td>
        <td>Builds and executes a SQL statement for renaming a column.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="renameTable()">
        <td><a href="yii-db-migration.html#renameTable()-detail">renameTable()</a></td>
        <td>Builds and executes a SQL statement for renaming a DB table.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="safeDown()">
        <td><a href="yii-db-migration.html#safeDown()-detail">safeDown()</a></td>
        <td>This method contains the logic to be executed when removing this migration.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="safeUp()">
        <td><a href="yii-db-migration.html#safeUp()-detail">safeUp()</a></td>
        <td>This method contains the logic to be executed when applying this migration.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr class="inherited" id="smallInteger()">
        <td><a href="yii-db-schemabuildertrait.html#smallInteger()-detail">smallInteger()</a></td>
        <td>Creates a smallint column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="string()">
        <td><a href="yii-db-schemabuildertrait.html#string()-detail">string()</a></td>
        <td>Creates a string column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="text()">
        <td><a href="yii-db-schemabuildertrait.html#text()-detail">text()</a></td>
        <td>Creates a text column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="time()">
        <td><a href="yii-db-schemabuildertrait.html#time()-detail">time()</a></td>
        <td>Creates a time column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="timestamp()">
        <td><a href="yii-db-schemabuildertrait.html#timestamp()-detail">timestamp()</a></td>
        <td>Creates a timestamp column.</td>
        <td><a href="yii-db-schemabuildertrait.html">yii\db\SchemaBuilderTrait</a></td>
    </tr>
            <tr class="inherited" id="trigger()">
        <td><a href="yii-base-component.html#trigger()-detail">trigger()</a></td>
        <td>Triggers an event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="truncateTable()">
        <td><a href="yii-db-migration.html#truncateTable()-detail">truncateTable()</a></td>
        <td>Builds and executes a SQL statement for truncating a DB table.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="up()">
        <td><a href="yii-db-migration.html#up()-detail">up()</a></td>
        <td>This method contains the logic to be executed when applying this migration.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
            <tr id="update()">
        <td><a href="yii-db-migration.html#update()-detail">update()</a></td>
        <td>Creates and executes an UPDATE SQL statement.</td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
    </table>
</div>

<div class="summary doc-method">
<h2>Protected Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
                                                                                                                                                                                                    <tr id="getDb()">
        <td><a href="yii-db-migration.html#getDb()-detail">getDb()</a></td>
        <td></td>
        <td><a href="yii-db-migration.html">yii\db\Migration</a></td>
    </tr>
                                                                                                </table>
</div>

<a id="events"></a>

<a id="constants"></a>

<h2>Property Details</h2>

<div class="property-doc">

    <div class="detail-header h3" id="$db-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#$db-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L60" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L60" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $db        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>The DB connection object or the application component ID of the DB connection
that this migration should work with. Starting from version 2.0.2, this can also be a configuration array
for creating the object.</p>
<p>Note that when a Migration object is created by the <code>migrate</code> command, this property will be overwritten
by the command. If you do not want to use the DB connection provided by the command, you may override
the <a href="yii-db-migration.html#init()-detail">init()</a> method like the following:</p>
<pre><code class="hljs php language-php"><span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">init</span><span class="hljs-params">()</span>
</span>{
    <span class="hljs-variable">$this</span>-&gt;db = <span class="hljs-string">'db2'</span>;
    <span class="hljs-keyword">parent</span>::init();
}
</code></pre>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-db-connection.html">yii\db\Connection</a>|<a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/language.types.string">string</a></span> <a href="yii-db-migration.html#$db-detail">$db</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'db'</span></div>

</div>
<h2>Method Details</h2>

<div class="method-doc">

    <div class="detail-header h3" id="addColumn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#addColumn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L314" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L314" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        addColumn()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for adding a new DB column.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#addColumn()-detail">addColumn</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$column</span>, <span style="color: #0000BB">$type</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that the new column will be added to. The table name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$column</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the new column. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$type</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The column type. The <a href="yii-db-querybuilder.html#getColumnType()-detail">yii\db\QueryBuilder::getColumnType()</a> method will be invoked to convert abstract column type (if any)
into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL.
For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="addCommentOnColumn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#addCommentOnColumn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L470" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L470" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        addCommentOnColumn()
        <span class="detail-header-tag small">
            public                                    method
                            (available since version 2.0.8)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and execute a SQL statement for adding comment to column</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-db-migration.html">$this</a></span> <strong><a href="yii-db-migration.html#addCommentOnColumn()-detail">addCommentOnColumn</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$column</span>, <span style="color: #0000BB">$comment</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose column is to be commented. The table name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$column</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the column to be commented. The column name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$comment</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The text of the comment to be added. The comment will be properly quoted by the method.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-db-migration.html">$this</a></td>
                  <td class="param-desc-col"><p>The command object itself</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="addCommentOnTable()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#addCommentOnTable()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L486" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L486" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        addCommentOnTable()
        <span class="detail-header-tag small">
            public                                    method
                            (available since version 2.0.8)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds a SQL statement for adding comment to table</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-db-migration.html">$this</a></span> <strong><a href="yii-db-migration.html#addCommentOnTable()-detail">addCommentOnTable</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$comment</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose column is to be commented. The table name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$comment</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The text of the comment to be added. The comment will be properly quoted by the method.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-db-migration.html">$this</a></td>
                  <td class="param-desc-col"><p>The command object itself</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="addForeignKey()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#addForeignKey()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L410" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L410" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        addForeignKey()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds a SQL statement for adding a foreign key constraint to an existing table.</strong></p>

        <p>The method will properly quote the table and column names.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#addForeignKey()-detail">addForeignKey</a></strong> ( <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$columns</span>, <span style="color: #0000BB">$refTable</span>, <span style="color: #0000BB">$refColumns</span>, <span style="color: #0000BB">$delete&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span>, <span style="color: #0000BB">$update&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the foreign key constraint.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that the foreign key constraint will be added to.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$columns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas or use an array.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$refTable</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that the foreign key references to.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$refColumns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The name of the column that the foreign key references to. If there are multiple columns, separate them with commas or use an array.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$delete</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$update</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="addPrimaryKey()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#addPrimaryKey()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L378" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L378" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        addPrimaryKey()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for creating a primary key.</strong></p>

        <p>The method will properly quote the table and column names.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#addPrimaryKey()-detail">addPrimaryKey</a></strong> ( <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$columns</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the primary key constraint.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that the primary key constraint will be added to.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$columns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Comma separated string or array of columns that the primary key will consist of.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="alterColumn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#alterColumn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L360" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L360" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        alterColumn()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for changing the definition of a column.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#alterColumn()-detail">alterColumn</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$column</span>, <span style="color: #0000BB">$type</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose column is to be changed. The table name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$column</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the column to be changed. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$type</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The new column type. The <a href="yii-db-querybuilder.html#getColumnType()-detail">yii\db\QueryBuilder::getColumnType()</a> method will be invoked to convert abstract column type (if any)
into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL.
For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="batchInsert()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#batchInsert()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L200" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L200" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        batchInsert()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates and executes an batch INSERT SQL statement.</strong></p>

        <p>The method will properly escape the column names, and bind the values to be inserted.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#batchInsert()-detail">batchInsert</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$columns</span>, <span style="color: #0000BB">$rows</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that new rows will be inserted into.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$columns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The column names.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$rows</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The rows to be batch inserted into the table</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="createIndex()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#createIndex()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L440" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L440" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        createIndex()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for creating a new index.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#createIndex()-detail">createIndex</a></strong> ( <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$columns</span>, <span style="color: #0000BB">$unique&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the index. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that the new index will be created for. The table name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$columns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The column(s) that should be included in the index. If there are multiple columns, please separate them
by commas or use an array. Each column name will be properly quoted by the method. Quoting will be skipped for column names that
include a left parenthesis "(".</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$unique</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to add UNIQUE constraint on the created index.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="createTable()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#createTable()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L256" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L256" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        createTable()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for creating a new DB table.</strong></p>

        <p>The columns in the new  table should be specified as name-definition pairs (e.g. 'name' =&gt; 'string'),
where name stands for a column name which will be properly quoted by the method, and definition
stands for the column type which can contain an abstract DB type.</p>
<p>The <a href="yii-db-querybuilder.html#getColumnType()-detail">yii\db\QueryBuilder::getColumnType()</a> method will be invoked to convert any abstract type into a physical one.</p>
<p>If a column is specified with definition only (e.g. 'PRIMARY KEY (name, type)'), it will be directly
put into the generated SQL.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#createTable()-detail">createTable</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$columns</span>, <span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the table to be created. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$columns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The columns (name =&gt; definition) in the new table.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$options</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Additional SQL fragment that will be appended to the generated SQL.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="delete()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#delete()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L232" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L232" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        delete()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates and executes a DELETE SQL statement.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#delete()-detail">delete</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$condition&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span>, <span style="color: #0000BB">$params&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table where the data will be deleted from.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$condition</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The conditions that will be put in the WHERE part. Please
refer to <a href="yii-db-query.html#where()-detail">yii\db\Query::where()</a> on how to specify conditions.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$params</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The parameters to be bound to the query.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="down()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#down()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L117" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L117" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        down()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>This method contains the logic to be executed when removing this migration.</strong></p>

        <p>The default implementation throws an exception indicating the migration cannot be removed.
Child classes may override this method if the corresponding migrations can be removed.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-db-migration.html#down()-detail">down</a></strong> ( )</td></tr>
                                                <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Return a false value to indicate the migration fails
and should not proceed further. All other return values mean the migration succeeds.</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="dropColumn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#dropColumn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L330" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L330" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        dropColumn()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for dropping a DB column.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#dropColumn()-detail">dropColumn</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$column</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose column is to be dropped. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$column</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the column to be dropped. The name will be properly quoted by the method.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="dropCommentFromColumn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#dropCommentFromColumn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L502" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L502" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        dropCommentFromColumn()
        <span class="detail-header-tag small">
            public                                    method
                            (available since version 2.0.8)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and execute a SQL statement for dropping comment from column</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-db-migration.html">$this</a></span> <strong><a href="yii-db-migration.html#dropCommentFromColumn()-detail">dropCommentFromColumn</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$column</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose column is to be commented. The table name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$column</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the column to be commented. The column name will be properly quoted by the method.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-db-migration.html">$this</a></td>
                  <td class="param-desc-col"><p>The command object itself</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="dropCommentFromTable()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#dropCommentFromTable()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L517" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L517" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        dropCommentFromTable()
        <span class="detail-header-tag small">
            public                                    method
                            (available since version 2.0.8)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds a SQL statement for dropping comment from table</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-db-migration.html">$this</a></span> <strong><a href="yii-db-migration.html#dropCommentFromTable()-detail">dropCommentFromTable</a></strong> ( <span style="color: #0000BB">$table</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose column is to be commented. The table name will be properly quoted by the method.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-db-migration.html">$this</a></td>
                  <td class="param-desc-col"><p>The command object itself</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="dropForeignKey()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#dropForeignKey()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L423" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L423" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        dropForeignKey()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds a SQL statement for dropping a foreign key constraint.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#dropForeignKey()-detail">dropForeignKey</a></strong> ( <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$table</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the foreign key constraint to be dropped. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose foreign is to be dropped. The name will be properly quoted by the method.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="dropIndex()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#dropIndex()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L453" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L453" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        dropIndex()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for dropping an index.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#dropIndex()-detail">dropIndex</a></strong> ( <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$table</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the index to be dropped. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose index is to be dropped. The name will be properly quoted by the method.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="dropPrimaryKey()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#dropPrimaryKey()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L391" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L391" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        dropPrimaryKey()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for dropping a primary key.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#dropPrimaryKey()-detail">dropPrimaryKey</a></strong> ( <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$table</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The name of the primary key constraint to be removed.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that the primary key constraint will be removed from.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="dropTable()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#dropTable()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L286" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L286" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        dropTable()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for dropping a DB table.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#dropTable()-detail">dropTable</a></strong> ( <span style="color: #0000BB">$table</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table to be dropped. The name will be properly quoted by the method.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="execute()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#execute()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L171" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L171" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        execute()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Executes a SQL statement.</strong></p>

        <p>This method executes the specified SQL statement using <a href="yii-db-migration.html#$db-detail">$db</a>.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#execute()-detail">execute</a></strong> ( <span style="color: #0000BB">$sql</span>, <span style="color: #0000BB">$params&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$sql</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The SQL statement to be executed</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$params</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Input parameters (name =&gt; value) for the SQL execution.
See <a href="yii-db-command.html#execute()-detail">yii\db\Command::execute()</a> for more details.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="getDb()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#getDb()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L78" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L78" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getDb()
        <span class="detail-header-tag small">
            protected                                    method
                            (available since version 2.0.6)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong></strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">protected</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#getDb()-detail">getDb</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="init()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#init()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L67" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L67" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        init()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Initializes the migration.</strong></p>

        <p>This method will set <a href="yii-db-migration.html#$db-detail">$db</a> to be the 'db' application component, if it is <code>null</code>.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#init()-detail">init</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="insert()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#insert()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L185" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L185" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        insert()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates and executes an INSERT SQL statement.</strong></p>

        <p>The method will properly escape the column names, and bind the values to be inserted.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#insert()-detail">insert</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$columns</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table that new rows will be inserted into.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$columns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The column data (name =&gt; value) to be inserted into the table.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="renameColumn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#renameColumn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L344" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L344" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        renameColumn()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for renaming a column.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#renameColumn()-detail">renameColumn</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$newName</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table whose column is to be renamed. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The old name of the column. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$newName</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The new name of the column. The name will be properly quoted by the method.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="renameTable()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#renameTable()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L274" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L274" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        renameTable()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for renaming a DB table.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#renameTable()-detail">renameTable</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$newName</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table to be renamed. The name will be properly quoted by the method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$newName</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The new table name. The name will be properly quoted by the method.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="safeDown()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#safeDown()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L160" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L160" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        safeDown()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>This method contains the logic to be executed when removing this migration.</strong></p>

        <p>This method differs from <a href="yii-db-migration.html#down()-detail">down()</a> in that the DB logic implemented here will
be enclosed within a DB transaction.
Child classes may implement this method instead of <a href="yii-db-migration.html#down()-detail">down()</a> if the DB logic
needs to be within a transaction.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-db-migration.html#safeDown()-detail">safeDown</a></strong> ( )</td></tr>
                                                <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Return a false value to indicate the migration fails
and should not proceed further. All other return values mean the migration succeeds.</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="safeUp()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#safeUp()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L147" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L147" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        safeUp()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>This method contains the logic to be executed when applying this migration.</strong></p>

        <p>This method differs from <a href="yii-db-migration.html#up()-detail">up()</a> in that the DB logic implemented here will
be enclosed within a DB transaction.
Child classes may implement this method instead of <a href="yii-db-migration.html#up()-detail">up()</a> if the DB logic
needs to be within a transaction.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-db-migration.html#safeUp()-detail">safeUp</a></strong> ( )</td></tr>
                                                <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Return a false value to indicate the migration fails
and should not proceed further. All other return values mean the migration succeeds.</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="truncateTable()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#truncateTable()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L298" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L298" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        truncateTable()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds and executes a SQL statement for truncating a DB table.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#truncateTable()-detail">truncateTable</a></strong> ( <span style="color: #0000BB">$table</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table to be truncated. The name will be properly quoted by the method.</p>
</td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="up()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#up()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L89" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L89" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        up()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>This method contains the logic to be executed when applying this migration.</strong></p>

        <p>Child classes may override this method to provide actual migration logic.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-db-migration.html#up()-detail">up</a></strong> ( )</td></tr>
                                                <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Return a false value to indicate the migration fails
and should not proceed further. All other return values mean the migration succeeds.</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="update()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-db-migration.html#update()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/db/Migration.php#L217" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/db/Migration.php#L217" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        update()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates and executes an UPDATE SQL statement.</strong></p>

        <p>The method will properly escape the column names and bind the values to be updated.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-db-migration.html#update()-detail">update</a></strong> ( <span style="color: #0000BB">$table</span>, <span style="color: #0000BB">$columns</span>, <span style="color: #0000BB">$condition&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span>, <span style="color: #0000BB">$params&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$table</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The table to be updated.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$columns</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The column data (name =&gt; value) to be updated.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$condition</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The conditions that will be put in the WHERE part. Please
refer to <a href="yii-db-query.html#where()-detail">yii\db\Query::where()</a> on how to specify conditions.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$params</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The parameters to be bound to the query.</p>
</td>
                </tr>
                                                </table>

<!--	-->
</div>
        </div>
</div>

<script type="text/javascript">
    /*<![CDATA[*/
    $("a.toggle").on('click', function () {
        var $this = $(this);
        if ($this.hasClass('properties-hidden')) {
            $this.text($this.text().replace(/Show/,'Hide'));
            $this.parents(".summary").find(".inherited").show();
            $this.removeClass('properties-hidden');
        } else {
            $this.text($this.text().replace(/Hide/,'Show'));
            $this.parents(".summary").find(".inherited").hide();
            $this.addClass('properties-hidden');
        }

        return false;
    });
    /*
     $(".sourceCode a.show").toggle(function () {
     $(this).text($(this).text().replace(/show/,'hide'));
     $(this).parents(".sourceCode").find("div.code").show();
     },function () {
     $(this).text($(this).text().replace(/hide/,'show'));
     $(this).parents(".sourceCode").find("div.code").hide();
     });
     $("a.sourceLink").click(function () {
     $(this).attr('target','_blank');
     });
     */
    /*]]>*/
</script>


</div>

<footer class="footer">
        <p class="pull-right"><small>Page generated on Sat, 09 Jul 2016 12:15:48 +0000</small></p>
    Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></footer>

<script type="text/javascript">jQuery(document).ready(function () {
    var shiftWindow = function () { scrollBy(0, -50) };
    if (location.hash) setTimeout(shiftWindow, 1);
    window.addEventListener("hashchange", shiftWindow);
var element = document.createElement("script");
element.src = "./jssearch.index.js";
document.body.appendChild(element);

var searchBox = $('#searchbox');

// search when typing in search field
searchBox.on("keyup", function(event) {
    var query = $(this).val();

    if (query == '' || event.which == 27) {
        $('#search-resultbox').hide();
        return;
    } else if (event.which == 13) {
        var selectedLink = $('#search-resultbox a.selected');
        if (selectedLink.length != 0) {
            document.location = selectedLink.attr('href');
            return;
        }
    } else if (event.which == 38 || event.which == 40) {
        $('#search-resultbox').show();

        var selected = $('#search-resultbox a.selected');
        if (selected.length == 0) {
            $('#search-results').find('a').first().addClass('selected');
        } else {
            var next;
            if (event.which == 40) {
                next = selected.parent().next().find('a').first();
            } else {
                next = selected.parent().prev().find('a').first();
            }
            if (next.length != 0) {
                var resultbox = $('#search-results');
                var position = next.position();

//              TODO scrolling is buggy and jumps around
//                resultbox.scrollTop(Math.floor(position.top));
//                console.log(position.top);

                selected.removeClass('selected');
                next.addClass('selected');
            }
        }

        return;
    }
    $('#search-resultbox').show();
    $('#search-results').html('<li><span class="no-results">No results</span></li>');

    var result = jssearch.search(query);

    if (result.length > 0) {
        var i = 0;
        var resHtml = '';

        for (var key in result) {
            if (i++ > 20) {
                break;
            }
            resHtml = resHtml +
            '<li><a href="' + result[key].file.u.substr(3) +'"><span class="title">' + result[key].file.t + '</span>' +
            '<span class="description">' + result[key].file.d + '</span></a></li>';
        }
        $('#search-results').html(resHtml);
    }
});

// hide the search results on ESC
$(document).on("keyup", function(event) { if (event.which == 27) { $('#search-resultbox').hide(); } });
// hide search results on click to document
$(document).bind('click', function (e) { $('#search-resultbox').hide(); });
// except the following:
searchBox.bind('click', function(e) { e.stopPropagation(); });
$('#search-resultbox').bind('click', function(e) { e.stopPropagation(); });

});</script></body>
</html>
